import React, { Component } from 'react'
import store from '../store'
import { connect } from 'react-redux'
class PostNum extends Component {
  render() {
    console.log(this.props)
    return <div>评论数 {this.props.comments.length}</div>
  }
}

const mapStateToProps = state => ({
  comments: state
})

export default connect(mapStateToProps)(PostNum)
